package cn.homework.day08;

import java.util.Arrays;
import java.util.function.Function;


public class Test08 {
    public static void main(String[] args) {
        Integer[]arr={1,2,3,4,5};
        Arrays.stream(arr);

        Integer[] in = Arrays.stream(arr).map(new Function<Integer, Integer>() {
            @Override
            public Integer apply(Integer integer) {
                return integer * integer;
            }
        }).toArray(Integer[]::new);

        System.out.println(Arrays.toString(in));

    }
}
